/**
 * @description help命令提示
 * @cmd npm run help
 */

import Table from 'table';

export default async () => {
  const data = [
    ['命令', '可选参数', '说明'],
    ['colpu-cli help', '-', '命令帮助'],
    ['colpu-cli start', '-', '本地开发【快捷命令】'],
    ['colpu-cli dev', '-', '本地开发'],
    ['colpu-cli inspect', '-', '开发调试'],
    ['colpu-cli build', '-', '发布构建'],
    ['colpu-cli service', 'local,preview,release,production', '启动node服务'],
    ['colpu-cli daemon', 'local,preview,release,production', '启动守护进程，当前为pm2守护进程'],
    ['colpu-cli deploy', 'local,preview,release,production', '启动pm2发布环境'],
    ['colpu-cli shipit', 'local,preview,release,production', '启动shipit发布环境'],
    ['colpu-cli create', '你需要创建的目录', '下载模板'],
  ];

  const config = {
    border: Table.getBorderCharacters('norc')
  };
  const output = Table.table(data, config);
  console.log(output);
};
